<?php

namespace App\Commons\Libs\KafkaPHP;

class Kafka
{

    public function producer($topic, $value, $key = '')
    {
        return app('kafka.producer')->send($topic, $value, $key);
    }

    public function consumer(string $group, array $topics)
    {
        return app('kafka.consumer')->start($group, $topics);
    }
}
